// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'
import Client from '@api/parking/api/ParkDashboardApi'

import OneClass from '@api/parking/model/EntranceAlarmReq'

const CLIENT = CORE.grpcCLIENT(Client)

// ============================== 导出远程接口 ============================== //

export default {
  // —————————————————————————————— 单项 —————————————————————————————— //

  async getAlarm({ id }, TIP = `查询出入口${CORE.MAP.ALARM}`) {
    const DTO = CORE.grpcDTO(OneClass, { entranceId: id })
    const resp = await CORE.grpc(TIP, CLIENT, 'QueryEntranceAlarm', DTO)
    return resp.content || {}
  },
}
